<%-- 
    Document   : pengarangView
    Created on : Feb 22, 2015, 7:43:32 PM
    Author     : Kim
--%>

<%@ include file="/common/header.jsp"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <div id="page-wrapper">
            <div class="row">
                <div class="col-lg-12">
                    <h1 class="page-header">List Pengarang</h1>
                </div>
                <!-- /.col-lg-12 -->
            </div>
            <!-- /.row -->
            <div class="row">
                <div class="col-lg-12">
                    <div class="panel panel-default">
                       
                        <!-- /.panel-heading -->
                        <div class="panel-body">
                            <input type="button" value="Data Baru" class="btn btn-primary" onclick="functionNewItem('<c:url value="/page/pengarangPrepareAdd.html" />');" />
                                   <input type="button" value="Hapus Data" class="btn btn-default" onclick="functionDeleteItemList('<c:url value="/page/pengarangDelete.html" />');" />
                                   <br>
                            <br>
                            <div class="table-responsive">
                                <table class="table table-striped table-bordered table-hover" id="dataTables-example">
                                    <thead>
                                        <tr>
                                            <th><input type="checkbox" class="checkbox" onclick="functionClickAll();" id="checkMaster" /></th>
                                            <th>Picture</th>
                                            <th>Kode Pengarang</th>
                                            <th>Nama Pengarang</th>
                                            <th>Gender Pengarang</th>
                                            <th>Tanggal Lahir</th>
                                            <th>Tempat Lahir</th>
                                            <th width="5%">Edit</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                    <c:forEach items="${data.pengarangList}" var="pengarang" varStatus="idx">
                                        <tr>
                                            <td><input type="hidden" value="<c:out value="${pengarang.kodePengarang}" />" id="hiddenId[<c:out value='${idx.index}' />]" name="hiddenId" />
                                        <input type="checkbox" onclick="" id="check[<c:out value='${idx.index}' />]" name="check" />
                                        </td>   
                                        <td><img src="data:image/jpeg;base64,  <c:out value="${pengarang.picture}" />" width="76px" height="108px" /></td>
                                        <td><c:out value="${pengarang.kodePengarang}" /></td>
                                        <td><c:out value="${pengarang.namaPengarang}" /></td>
                                        <td><c:out value="${pengarang.genderPengarang}" /></td>
                                        <td><fmt:formatDate value='${pengarang.tanggalUltah}' pattern="dd/MM/yyyy" /></td>
                                        <td><c:out value="${pengarang.tempatLahir}" /></td>
                                        <td>
                                            <a href="<c:url value="/page/pengarangPrepareUpdate.html?kodePengarang=${pengarang.kodePengarang}" />" style="border:0"><i class="fa fa-edit fa-fw"></i></a>
                                        </td>
                                        </tr>
                                    </c:forEach>
                                    </tbody>
                                </table>
                            </div>
                            <!-- /.table-responsive -->
                        </div>
                        <!-- /.panel-body -->
                    </div>
                    <!-- /.panel -->
                </div>
                <!-- /.col-lg-12 -->
            </div>
        </div>
    </body>
</html>
<%@ include file="/common/footer.jsp"%>
